1. Field of the Invention
The present invention relates to a technique for controlling a white balance of image data.
2. Description of the Related Art
An imaging apparatus using an image sensor, such as a digital camera or a digital video camera, has a function of white balance control for adjusting color tone of image data acquired by capturing. White balance control includes manual white balance control and auto white balance control.
The manual white balance control previously captures an image of a white object and calculates a white balance coefficient, and the calculated white balance coefficient is applied to an entire image plane. The auto white balance control automatically detects a white portion in the captured image data, calculates the white balance coefficient based on an average value of each color component over the entire image plane, and then applies the calculated white balance coefficient to the entire image plane.
When a light source different from flash light is included in the image data in a scene where the flash is lit, the conventional auto white balance control applies the calculated white balance coefficient as described above to perform the white balance control. Therefore, it is difficult to perform the white balance control for adjusting respective light sources to appropriate colors.
For example, when a low-color temperature light source, such as a bulb color light source, is included as environment light in the scene where the flash is lit, since the flash light is a high-color temperature light source, if the white balance is adjusted to the flash light, it cannot be adjusted to the low-color temperature light source. On the other hand, when the white balance is adjusted to the low-color temperature light source, it cannot be adjusted to the flash light.
Further, even if the white balance control is performed by adjusting the white balance to a middle of the both light sources, the white balance can be adjusted to neither of the light sources. A region illuminated with the flash light becomes bluish, and a region illuminated with the low-color temperature light source becomes reddish.
To address the issue described above, Japanese Patent No. 3540485 discusses a technique described below. More specifically, the technique discussed in Japanese Patent No. 3540485 compares the image data captured when the flash is lit with the image data captured when the flash is not lit for each arbitrary object region to acquire a ratio of the data, and then determines a level of contribution of the flash light according to a value of the ratio.
Subsequently, the white balance control is performed by lighting the flash according to the determined contribution level, and selecting a white balance control value for each object region of the image data when it is exposed.
However, since development processing is performed after the white balance control value is varied for each object region, the technique discussed in Japanese Patent No. 3540485 may not appropriately perform other control, such as color reproduction, on the white balance control value.
Further, there is a time difference in acquisition timing between the image data captured with the flash lit and the image data captured with no flash lit.
Therefore, according to the technique discussed in Japanese Patent No. 3540485, since, when an object is moving or when an imaging apparatus is moving, an illumination area and an amount of illumination may be erroneously detected, tint variation may occur at a boundary portion of the object.